VERSION 5.00
Object = "{2B16AE89-350D-4A56-A3E2-A46C22F5FFD6}#9.0#0"; "UniDataGrid.ocx"
Begin VB.Form frmDownload 
   Caption         =   "Form1"
   ClientHeight    =   3765
   ClientLeft      =   60
   ClientTop       =   315
   ClientWidth     =   8655
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3765
   ScaleWidth      =   8655
   StartUpPosition =   2  'CenterScreen
   Begin UniDataGrid.UniGrid UniGrid1 
      Height          =   3525
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   8400
      _ExtentX        =   14817
      _ExtentY        =   6218
      BeginProperty FontHeader {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty FontCell {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColorHeader =   0
      ForeColorCell   =   0
      SelectFullRow   =   -1  'True
      Style           =   2
      RowHeight       =   20
      GridLine        =   -1  'True
      ColorGridLine   =   16711680
      ColorSelectedRow=   -2147483635
      ColorBorderSelectedRow=   12582912
   End
   Begin VB.Timer Timer1 
      Interval        =   50
      Left            =   7545
      Top             =   3795
   End
End
Attribute VB_Name = "frmDownload"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Form_Load()
    Dim i As Integer
    iRo = 0
    
    With UniGrid1
        .Columns.Add "Address", "add", 120
        .Columns.Add "File Name", "fname", 80
        .Columns.Add "File Size", "size", 50
        .Columns.Add "Progress", "prog", 120, , 3
        .Columns.Add "Status", "status", 90, , 1

        
        For i = 1 To 5
            .Columns(0).AddCell "http://mediafire.com/?" & i
            .Columns(1).AddCell "Tap tin thu " & i
            .Columns(2).AddCell i * 2 & " kb"
            .Columns(3).AddCell 0
            .Columns(4).AddCell "Downloading"
            
        Next i
    End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
    frmStart.Show
End Sub

Private Sub Timer1_Timer()
    Dim i As Integer
    Randomize
    For i = 0 To 4
        If Val(UniGrid1.Columns(3).CellValue(i)) >= 100 Then
            UniGrid1.Columns(4).CellValue(i) = "Completed"
        Else
            UniGrid1.Columns(3).CellValue(i) = Fix(Val(UniGrid1.Columns(3).CellValue(i)) + Rnd() * 5)
            If UniGrid1.Columns(3).CellValue(i) > 100 Then UniGrid1.Columns(3).CellValue(i) = 100
        End If
    Next i
End Sub

